package co.edu.unal.geditor.view;

import java.awt.Dimension;
import java.awt.Graphics;

import javax.swing.JPanel;

public class StatusBar extends JPanel
{
	private static final long serialVersionUID = 1L;

	@Override
	public Dimension getPreferredSize()
	{
		return new Dimension( 0, 24 );
	}

	@Override
	public void paint( Graphics g )
	{
		super.paint( g );

		if ( m_sMsg != null )
		{
			g.drawString( m_sMsg, 5, 16 );
		}
	}

	public void setMsg( String sMsg )
	{
		m_sMsg = sMsg;
		
		repaint();
	}

	private String m_sMsg;
}
